/* eslint-disable import/prefer-default-export */
import request from '@/utils/request';

// 供应商名称字典
export async function getDictCode(params) {
  return request(`/csApi/supplier/getListByUser`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 获取列表数据
export async function getEmpList(params) {
  return request(`/csApi/supplier/getInfoList`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function queryDictItemsByCodes(params) {
  return request(`/csApi/mdm/nmDict/queryDictItemsByCodes`, {
    method: 'POST',
    body: params,
  });
}

export async function addInsert(params) {
  return request(`/csApi/supplier/insert`, {
    method: 'POST',
    body: params,
  });
}

export async function queryNmAreaByParent(params) {
  return request(`/csApi/mdm/baseService/queryNmAreaByParent`, {
    method: 'POST',
    body: params,
  });
}

export async function updateGet(params) {
  return request(`/csApi/supplier/get`, {
    method: 'POST',
    body: params,
  });
}

export async function update(params) {
  return request(`/csApi/supplier/update`, {
    method: 'POST',
    body: params,
  });
}

export async function bankGetList(params) {
  return request(`/csApi/suppBankAccount/getList`, {
    method: 'POST',
    body: params,
  });
}

export async function queryNmArea(params) {
  return request(`/csApi/mdm/nmArea/queryNmArea`, {
    method: 'POST',
    body: params,
  });
}

export async function deleteMul(params) {
  return request(`/csApi/suppBankAccount/deleteMul`, {
    method: 'POST',
    body: params,
  });
}

export async function bankGet(params) {
  return request(`/csApi/suppBankAccount/get`, {
    method: 'POST',
    body: params,
  });
}

export async function bankInsert(params) {
  return request(`/csApi/suppBankAccount/insert`, {
    method: 'POST',
    body: params,
  });
}

export async function bankUpdate(params) {
  return request(`/csApi/suppBankAccount/update`, {
    method: 'POST',
    body: params,
  });
}

export async function contactGetList(params) {
  return request(`/csApi/suppContacts/getList`, {
    method: 'POST',
    body: params,
  });
}

export async function contactDelete(params) {
  return request(`/csApi/suppContacts/delete`, {
    method: 'POST',
    body: params,
  });
}

export async function contactGet(params) {
  return request(`/csApi/suppContacts/get`, {
    method: 'POST',
    body: params,
  });
}

export async function contactInsert(params) {
  return request(`/csApi/suppContacts/insert`, {
    method: 'POST',
    body: params,
  });
}

export async function contactUpdate(params) {
  return request(`/csApi/suppContacts/update`, {
    method: 'POST',
    body: params,
  });
}

export async function getCostCenter(params) {
  return request(`/csApi/costCenter/getCostCenter`, {
    method: 'POST',
    body: params,
  });
}

export async function delCostCenter(params) {
  return request(`/csApi/costCenter/delCostCenter`, {
    method: 'POST',
    body: params,
  });
}

export async function costcenterInsert(params) {
  return request(`/csApi/costCenter/insert`, {
    method: 'POST',
    body: params,
  });
}

export async function getvatCoprName(params) {
  return request(`/csApi/suppInvoice/getvatCoprName`, {
    method: 'POST',
    body: params,
  });
}

export async function getInvoiceList(params) {
  return request(`/csApi/suppInvoice/getInvoiceList`, {
    method: 'POST',
    body: params,
  });
}

export async function invoiceDeleteMul(params) {
  return request(`/csApi/suppInvoice/deleteMul`, {
    method: 'POST',
    body: params,
  });
}

export async function invoiceGet(params) {
  return request(`/csApi/suppInvoice/get`, {
    method: 'POST',
    body: params,
  });
}

export async function invoiceInsert(params) {
  return request(`/csApi/suppInvoice/insert`, {
    method: 'POST',
    body: params,
  });
}

export async function invoiceUpdate(params) {
  return request(`/csApi/suppInvoice/update`, {
    method: 'POST',
    body: params,
  });
}

export async function mailingaddressGetList(params) {
  return request(`/csApi/suppMailAddr/getList`, {
    method: 'POST',
    body: params,
  });
}

export async function mailingaddressDeleteMul(params) {
  return request(`/csApi/suppMailAddr/deleteMul`, {
    method: 'POST',
    body: params,
  });
}

export async function mailingaddressGet(params) {
  return request(`/mgrApi/suppMailAddr/get`, {
    method: 'POST',
    body: params,
  });
}

export async function mailingaddressInsert(params) {
  return request(`/csApi/suppMailAddr/insert`, {
    method: 'POST',
    body: params,
  });
}

export async function mailingaddressUpdate(params) {
  return request(`/csApi/suppMailAddr/update`, {
    method: 'POST',
    body: params,
  });
}

export async function supplyinvoiceGet(params) {
  return request(`/csApi/suppPrintInvoice/get`, {
    method: 'POST',
    body: params,
  });
}

export async function suppliyinvoiceUpdate(params) {
  return request(`/csApi/suppPrintInvoice/update`, {
    method: 'POST',
    body: params,
  });
}

export async function getSuppInfo(params) {
  return request(`/csApi/supplier/getSuppInfo`, {
    method: 'POST',
    body: params,
  });
}

export async function fetchCount(params) {
  return request(`/csApi/supplier/count`, {
    method: 'POST',
    body: params,
  });
}

export async function idxDeleteMul(params) {
  return request(`/csApi/supplier/deleteMul`, {
    method: 'POST',
    body: params,
  });
}

export async function updateStatus(params) {
  return request(`/csApi/supplier/updateStatus`, {
    method: 'POST',
    body: params,
  });
}

export async function dataRecord(params) {
  return request(`/csApi/custInfo/dataRecord`, {
    method: 'POST',
    body: params,
  });
}
